package com.example.user.mapper;

import com.example.model.user.Menu;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author xie
* @description 针对表【sys_menu(菜单权限表)】的数据库操作Mapper
* @createDate 2025-04-27 16:00:43
* @Entity com.example.model.user.Menu
*/
@Mapper
public interface MenuMapper {

    int delete(Long id);

    int insert(Menu record);

    Menu get(Long id);

    List<Menu> list(Menu menu);

    List<Menu> listMenu();

    List<Menu> listMenuAll();

    List<Menu> listMenuByUserId(Long userId);

    //管理员使用，获取全部权限
    List<String> getMenuPerms();

    List<String> getMenuPermsByUserId(Long userId);

    List<String> getMenuPermsByRoleId(Long roleId);

    int update(Menu record);

    List<Menu> listMenuByRoleId(Long roleId);
}
